import java.math.BigInteger;

public class LeetCode507 {
    public static void main(String[] args) {
        BigInteger bigInteger = BigInteger.TWO;

        BigInteger pow = bigInteger.pow(3021376).subtract(BigInteger.ONE);


    }

    public static boolean checkPerfectNumber(int num) {
        if (num == 1) {
            return false;
        }

        int number = 0;
        int sqrtNum = (int) Math.sqrt(num);
        for (int i = 2; i <= sqrtNum; i++) {
            if (num % i == 0) {
                number += i;
                number += num / i;
            }
        }

        return number + 1 == num;
    }

}
